from tkinter import *

master = Tk()

master.geometry('500x500')
master.title('It-marafon')
canvas = Canvas(master, bg= 'yellow', width= 500, height= 500)
coords = [0, 0, 30, 0, 30, 30, 60, 30, 60, 60, 30, 60, 30, 90, 0, 90, 0, 0]

print('Координата x')
x = int(input())
print('Координата y')
y = int(input())
print('Коэффицент увеличения')
a = int(input())


if a == 0 and x >= 0 and x <= 500 and y >= 0 and y <= 500:
    pass
else:
    if a > 0 and 0*a+x >= 0 and 0*a+y >= 0 and 20*a+x <= 500 and 20*a+y <= 500:
        pass
    else:
        if a < 0 and x <= 500 and y <= 500 and 60*a+x >= 0 and 90*a+y >= 0:
            pass
        else:
            print('Размер превышает  максимальный размер поля')
            exit()
canvas.pack()
canvas.create_polygon(coords[0] *a+x, coords[1] *a+y,
                      coords[2] *a+x, coords[3] *a+y,
                      coords[4] *a+x, coords[5] *a+y,
                      coords[6] *a+x, coords[7] *a+y,
                      coords[8] *a+x, coords[9] *a+y,
                      coords[10] *a+x,coords[11] *a+y,
                      coords[12] * a + x,coords[13] *a+y,
                      coords[14] * a + x, coords[15] *a+y,
                      coords[16] * a + x, coords[17] *a+y,)
mainloop()